package com.match.competition_role.service;

import com.alibaba.fastjson.JSONObject;
import com.match.competition_role.entity.CompetitionPermission;
import com.baomidou.mybatisplus.extension.service.IService;


import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author AdiosF
 * @since 2021-10-08
 */
public interface CompetitionPermissionService extends IService<CompetitionPermission> {

    //查询所有权限
    List<CompetitionPermission> findAllPermission();

    //根据权限id删除权限
    void deletePermissionById(String permissionId);

    //给角色分配权限
    void saveRolePermission(String roleId, String[] permissionId);

    //根据教师职工号获取教师权限
    List<String> selectPermissionValueByTeacherNumber(String number);

    //根据用户number获取用户菜单权限
    List<JSONObject> selectPermissionByUserNumber(String number);

    //新增权限
    CompetitionPermission saveCompetitionPermission(CompetitionPermission competitionPermission);

    //获取子菜单
    List<CompetitionPermission> getChildren(String id, Boolean states);

}
